<nz-card class="list_card" [nzTitle]="cardTitle">
  <form nz-form>
    <nz-tabset>
      <!-- 缓存维护选项卡 -->
      <nz-tab [nzTitle]="cachingTabTitleTpl">
        <ng-template #cachingTabTitleTpl>
          <span>缓存</span>
        </ng-template>
        <nz-card [nzBordered]="false" [nzExtra]="cachingExtra">
          <ng-template #cachingExtra>
            <!-- (click)="clearAllCaches()" -->
            <button nz-button [nzType]="'primary'">
              <i class="anticon anticon-delete"></i>
              <span>全部清空</span>
            </button>
          </ng-template>

          <nz-table #ajaxTable [nzData]="caches" [nzLoading]="loading" [nzShowPagination]="false">
            <thead nz-thead>
              <tr>
                <th nz-th></th>
                <th nz-th></th>
              </tr>
            </thead>
            <tbody nz-tbody>
              <tr nz-tbody-tr *ngFor="let item of ajaxTable.data">
                <td>
                  {{item.name}}
                </td>
                <td nz-td>
                  <a (click)="clearCache(item.name)">
                    清空
                  </a>
                </td>
              </tr>
            </tbody>
          </nz-table>



        </nz-card>

      </nz-tab>

      <!-- 网站日志选项卡 -->
      <nz-tab [nzTitle]="'网站日志'">
        <nz-card [nzBordered]="false" [nzExtra]="webSiteLogExtra">
          <ng-template #webSiteLogExtra>
            <button nz-button [nzType]="'primary'" (click)="downloadWebLogs()">
              <i class="anticon anticon-download"></i>
              <span>全部下载</span>
            </button>
            <button nz-button [nzType]="'primary'" (click)="getWebLogs()">
              <i class="anticon anticon-reload"></i>
              <span>刷新</span>
            </button>
          </ng-template>
          <div class="web-log-view full-height">
            <div class="log-line" *ngFor="let log of logs">
              <span [class]="getLogClass(log)">{{getLogType(log)}}</span>
              {{getRawLogContent(log)}}
            </div>
          </div>
        </nz-card>
      </nz-tab>

    </nz-tabset>
  </form>

</nz-card>

<ng-template #cardTitle>
  <div class="card_title">
    <i style="margin-right: 10px" nz-icon [type]="'maintenance'" theme="fill"></i> 维护
  </div>
</ng-template>
